/**
 *
 * @author Tritonio, DimBiC
 */

package jrpc;

class RemoteHost {

    String hostname;
    int port;

    RemoteHost(String combined) throws ArrayIndexOutOfBoundsException , NumberFormatException  {
        String[] substrings = combined.split(":");
        hostname=substrings[0];
        port=Integer.parseInt(substrings[1]);
        if ((port<1)||(port>65535)){
            NumberFormatException err = new NumberFormatException();
            throw err;
        }
    }

}
